extends PropertyFindSetter


class_name CollisionMaskSetter
"""
修改碰撞层
"""


@export_enum("+", "-") var mode: String = ""
@export var value: int = 0


func __get_update_value(w: Object, p: String) -> Variant:
    var v: int = w[p]
    match mode:
        "+":
            return v | value
        "-":
            return v & (~value)
    return v
